package cn.wsalix.admin.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import cn.anlaser.entity.RelatedEntity;

@Entity
@Table(name = "ADMIN_MENU_PERMIT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicUpdate
@DynamicInsert
@Data
@EqualsAndHashCode(callSuper = false)
public class MenuPermit extends RelatedEntity<SysMenu, Permit> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 3705948039849108162L;

	@Column(name = "NAME")
	private String name;
	@Column(name = "CODE")
	protected String code;
	/*@ManyToOne(cascade = CascadeType.MERGE, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "MENU_ID")
	private SysMenu menu;

	@ManyToOne(cascade = CascadeType.MERGE, optional = false, fetch = FetchType.LAZY)
	@JoinColumn(name = "PERMIT_ID")
	private Permit permit;*/

}